package com.liuda066.forumssm.exception;

import com.liuda066.forumssm.common.AppResult;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/9/1 10:30
 */
public class ApplicationException extends RuntimeException{

    //自定义错误
    protected AppResult errorResult;


    public ApplicationException(AppResult errorResult) {
        super(errorResult.getMessage());
        this.errorResult = errorResult;
    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(String message,Throwable cause) {
        super(message,cause);
    }

    public AppResult getErrorResult() {
        return errorResult;
    }
}
